<?php defined('SYSPATH') OR die('No direct access allowed.');

class Category_Model extends ORM {

    protected $has_and_belongs_to_many = array('articles');

    public function unique_key($id)
    {
    	if ( ! empty($id) AND is_string($id) AND ! ctype_digit($id))
      {
      	return 'name';
      }
		return parent::unique_key($id);
    }

}